//
//  XSRefreshView.h
//  bannerZoom
//
//  Created by xingshuai on 2021/4/8.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, RefreshViewStyle) {
    RefreshViewStyleNormal,  // 普通状态
    RefreshViewStylePulling, // 超过临界点
    RefreshViewStyleLoad     // 正在刷新
};

@interface XSRefreshView : UIView

/** 刷新控件状态 */
@property (nonatomic, assign) RefreshViewStyle refreshStyle;

/** 状态变化临界值 */
@property (nonatomic, assign) CGFloat refreshOffset;

/** 开始 */
-(void)startAnimation:(void(^)(void))start;

/** 移除 */
-(void)removeAnimation;


/**
 刷新控件设置

 @param scrollY 下拉值
 @param isDragging 是否正在拖拽
 @param load 加载刷新
 */
-(void)contentOffsetY:(CGFloat)scrollY withDragging:(BOOL)isDragging isStyleLoad:(void(^)(void))load;

@end

NS_ASSUME_NONNULL_END
